# 1.需要安装requests 第三方 模块
# pip install requests

import requests

url = "http://www.baidu.com"

response = requests.get(url)
data_b = response.content  # content属性  返回的是字节 bytes
data_str = data_b.decode('utf-8')
data_text = response.text
print(data_text)

